Skip to content

feat(ntx-builder): materialize note eligibility in the database - #2582

Merged
kkovaacs merged 2 commits into
nextfrom
santiagopittella-ntx-eligibility-column
Sep 30, 2026
Merged

kkovaacs merged 2 commits into
nextfrom
santiagopittella-ntx-eligibility-column

Conversation

@SantiagoPittella

@SantiagoPittella SantiagoPittella commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds notes.next_eligible_block: the first block at which a note may be attempted, being the later of its execution-hint window and its post-failure backoff. Every write path maintains it, and the backoff and hint arithmetic moves into db::eligibility so the read and write paths share one definition.

Nothing reads the column yet.

A sponsorship arriving for a pending feature note now clears that note's backoff, since the note may have failed for an uncovered fee and the sponsorship is new information. Existing rows default to 0 (eligible now).

Changelog

[[entry]]
scope       = "ntx-builder"
impact      = "added"
description = "Added the `notes.next_eligible_block` column."

@SantiagoPittella
SantiagoPittella force-pushed the santiagopittella-ntx-eligibility-column branch 2 times, most recently from bc67b0c to 1c7df12 Compare September 8, 2026 13:33
Comment thread bin/ntx-builder/src/db/queries/insert_network_notes/mod.rs Outdated
Comment thread bin/ntx-builder/src/db/queries/notes_failed/mod.rs Outdated
Comment thread bin/ntx-builder/src/db/queries/notes_failed/select_note_backoff.sql Outdated
Comment thread bin/ntx-builder/src/db/queries/tests.rs
Comment thread bin/ntx-builder/src/db/eligibility.rs Outdated
@SantiagoPittella
SantiagoPittella force-pushed the santiagopittella-ntx-eligibility-column branch 4 times, most recently from d3981ab to 5cd0416 Compare September 16, 2026 18:44
@SantiagoPittella
SantiagoPittella force-pushed the santiagopittella-ntx-eligibility-column branch 4 times, most recently from 88e5030 to ba85d25 Compare September 21, 2026 20:22
@SantiagoPittella
SantiagoPittella force-pushed the santiagopittella-ntx-eligibility-column branch 5 times, most recently from 4c62027 to 182a7f3 Compare September 29, 2026 13:27
@kkovaacs
kkovaacs force-pushed the santiagopittella-ntx-eligibility-column branch from 182a7f3 to 6f10e29 Compare September 30, 2026 08:11
@kkovaacs
kkovaacs merged commit 819f65f into next Sep 30, 2026
28 checks passed
@kkovaacs
kkovaacs deleted the santiagopittella-ntx-eligibility-column branch September 30, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants